<?php

use Illuminate\Database\Eloquent\Model;

/**
 * 售后退货单
 */
class orderaftersalereturnModel extends Model
{

    // 表名,不含前缀
    protected $table = 'order_aftersale_return';

    protected $appends = [];

    protected function serializeDate($date)
    {
        return $date->format('Y-m-d H:i:s');
    }

    public function aftersale()
    {
        return $this->belongsTo(orderaftersaleModel::class, 'order_aftersale_id', 'id');
    }

    public function order()
    {
        return $this->belongsTo(orderModel::class, 'order_id', 'id');
    }

    public function member()
    {
        return $this->belongsTo(memberModel::class, 'member_id', 'id');
    }

}
